package com.ruoyi.documents.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.documents.mapper.DocContractMapper;
import com.ruoyi.documents.domain.DocContract;
import com.ruoyi.documents.service.IDocContractService;

/**
 * 项目合同图片Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-12-21
 */
@Service
public class DocContractServiceImpl implements IDocContractService 
{
    @Autowired
    private DocContractMapper docContractMapper;

    /**
     * 查询项目合同图片
     * 
     * @param id 项目合同图片主键
     * @return 项目合同图片
     */
    @Override
    public DocContract selectDocContractById(Long id)
    {
        return docContractMapper.selectDocContractById(id);
    }

    /**
     * 查询项目合同图片列表
     * 
     * @param docContract 项目合同图片
     * @return 项目合同图片
     */
    @Override
    public List<DocContract> selectDocContractList(DocContract docContract)
    {
        return docContractMapper.selectDocContractList(docContract);
    }

    /**
     * 新增项目合同图片
     * 
     * @param docContract 项目合同图片
     * @return 结果
     */
    @Override
    public int insertDocContract(DocContract docContract)
    {
        docContract.setCreateTime(DateUtils.getNowDate());
        return docContractMapper.insertDocContract(docContract);
    }

    /**
     * 修改项目合同图片
     * 
     * @param docContract 项目合同图片
     * @return 结果
     */
    @Override
    public int updateDocContract(DocContract docContract)
    {
        docContract.setUpdateTime(DateUtils.getNowDate());
        return docContractMapper.updateDocContract(docContract);
    }

    /**
     * 批量删除项目合同图片
     * 
     * @param ids 需要删除的项目合同图片主键
     * @return 结果
     */
    @Override
    public int deleteDocContractByIds(Long[] ids)
    {
        return docContractMapper.deleteDocContractByIds(ids);
    }

    /**
     * 删除项目合同图片信息
     * 
     * @param id 项目合同图片主键
     * @return 结果
     */
    @Override
    public int deleteDocContractById(Long id)
    {
        return docContractMapper.deleteDocContractById(id);
    }
}
